package com.lesama.jdk8.interval;



import java.time.LocalDateTime;

import java.time.temporal.ChronoUnit;



public class ChronoUnitDemo {

    public static void main(String[] args) {

        LocalDateTime now = LocalDateTime.now();

        LocalDateTime birthdayDate = LocalDateTime.of(2002, 6, 17, 8, 15, 15);

        System.out.println(ChronoUnit.YEARS.between(birthdayDate, now));

    }

}